package cn.edu.zafu.bigdata.cccnnn.workthree;


import cn.hutool.extra.template.engine.freemarker.FreemarkerTemplate;

class divide{
    static int a;
    static int b;
    public static int Divide(){
        if (b==0) {
            throw new ArithmeticException("Division is zero");
        }
        else {
            return a/b;
        }
    }

}

public class Testdivide {
    public static void main(String[] args){
        divide.a=10;
        divide.b=0;

        try {
            int  d= divide.Divide();
            System.out.println("result:"+d);

        }catch (ArithmeticException e){
            System.out.println(e.getMessage());
        }

    }

}
